
#include<iostream>

using namespace std;

class OS {
public:
	virtual void Install() = 0;

};


class LinuxOS : public OS {
public:
	void Install() {cout << "Install Linux OS" <<endl;}

};

class WindowsOS : public OS {
public:
	void Install() {cout << "Install Windows OS" <<endl;}

};


class Computer{
public:
	virtual void printInfo() = 0;
};

class MAC : public Computer{
public:
	void printInfo(){cout << "This is Mac,   " ;}
};

class MACwithLinux : public MAC,public LinuxOS{
public:
	void InstallOS()
	{
		printInfo();
		Install();
	}
};


class MACwithWindows : public MAC, public WindowsOS{
public:
	void InstallOS()
	{
		printInfo();
		Install();
	}
};



class Lenovo : public Computer{
public:
	void printInfo(){cout << "This is Lenovo,   " ;}
};

class LenovowithLinux : public Lenovo,public LinuxOS{
public:
	void InstallOS()
	{
		printInfo();
		Install();
	}
};


class LenovowithWindows : public Lenovo, public WindowsOS{
public:
	void InstallOS()
	{
		printInfo();
		Install();
	}
};



int main()
{
	MACwithLinux a;
	a.InstallOS();

	LenovowithWindows b;
	b.InstallOS();

	return 0;
}




